package com.itheima;


import com.itheima.dao.BookDao;
import com.itheima.domain.Book;
import com.itheima.domain.PageBean;
import com.itheima.service.BookService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;


@SpringBootTest
public class test {


    @Autowired
    private BookService bookService;

    @Autowired
    private BookDao bookDao;

    @Test
    public void testGetById() {
        //PageBean<Book> pages = bookService.getByPages(1, 5);
        //System.out.println(pages.getRows());
        //List<Book> list = bookService.getAll();
        //System.out.println(list);
        Book book = bookDao.getById(2);
        System.out.println(book);
    }



}


